package com.dao;

import com.pojo.StudentInfo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StudentinfoDao {

    int insertInfo(StudentInfo studentInfo);

    List<StudentInfo> searchByParam(@Param("param") String param);

    @Delete("delete from studentinfo where Sno = #{id}")
    Integer deleteById(String id);

    Integer updateById(@Param("student") StudentInfo studentInfo,@Param("buildId") Integer INT_buildId);

    @Select("select * from studentinfo where Sno = #{sno}")
    StudentInfo selectBySno(@Param("sno") String sno);

}
